home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Programming / gcc-2.95.3-3 / info / g77.info-10 < prev    next >
Encoding:
GNU Info File  |  2001-07-15  |  48.6 KB  |  1,556 lines

  1. This is Info file f/g77.info, produced by Makeinfo version 1.68 from
  2. the input file ./f/g77.texi.
  3.  
  4. INFO-DIR-SECTION Programming
  5. START-INFO-DIR-ENTRY
  6. * g77: (g77).                  The GNU Fortran compiler.
  7. END-INFO-DIR-ENTRY
  8.    This file documents the use and the internals of the GNU Fortran
  9. (`g77') compiler.  It corresponds to the GCC-2.95 version of `g77'.
  10.  
  11.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  12. Boston, MA 02111-1307 USA
  13.  
  14.    Copyright (C) 1995-1999 Free Software Foundation, Inc.
  15.  
  16.    Permission is granted to make and distribute verbatim copies of this
  17. manual provided the copyright notice and this permission notice are
  18. preserved on all copies.
  19.  
  20.    Permission is granted to copy and distribute modified versions of
  21. this manual under the conditions for verbatim copying, provided also
  22. that the sections entitled "GNU General Public License," "Funding for
  23. Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are
  24. included exactly as in the original, and provided that the entire
  25. resulting derived work is distributed under the terms of a permission
  26. notice identical to this one.
  27.  
  28.    Permission is granted to copy and distribute translations of this
  29. manual into another language, under the above conditions for modified
  30. versions, except that the sections entitled "GNU General Public
  31. License," "Funding for Free Software," and "Protect Your Freedom--Fight
  32. `Look And Feel'", and this permission notice, may be included in
  33. translations approved by the Free Software Foundation instead of in the
  34. original English.
  35.  
  36.    Contributed by James Craig Burley (<craig@jcb-sc.com>).  Inspired by
  37. a first pass at translating `g77-0.5.16/f/DOC' that was contributed to
  38. Craig by David Ronis (<ronis@onsager.chem.mcgill.ca>).
  39.  
  40. 
  41. File: g77.info,  Node: Signal Intrinsic (subroutine),  Next: Sin Intrinsic,  Prev: Sign Intrinsic,  Up: Table of Intrinsic Functions
  42.  
  43. Signal Intrinsic (subroutine)
  44. .............................
  45.  
  46.      CALL Signal(NUMBER, HANDLER, STATUS)
  47.  
  48. NUMBER: `INTEGER'; scalar; INTENT(IN).
  49.  
  50. HANDLER: Signal handler (`INTEGER FUNCTION' or `SUBROUTINE') or
  51. dummy/global `INTEGER(KIND=1)' scalar.
  52.  
  53. STATUS: `INTEGER(KIND=7)'; OPTIONAL; scalar; INTENT(OUT).
  54.  
  55. Intrinsic groups: `unix'.
  56.  
  57. Description:
  58.  
  59.    If HANDLER is a an `EXTERNAL' routine, arranges for it to be invoked
  60. with a single integer argument (of system-dependent length) when signal
  61. NUMBER occurs.  If HANDLER is an integer, it can be used to turn off
  62. handling of signal NUMBER or revert to its default action.  See
  63. `signal(2)'.
  64.  
  65.    Note that HANDLER will be called using C conventions, so the value
  66. of its argument in Fortran terms Fortran terms is obtained by applying
  67. `%LOC()' (or LOC()) to it.
  68.  
  69.    The value returned by `signal(2)' is written to STATUS, if that
  70. argument is supplied.  Otherwise the return value is ignored.
  71.  
  72.    Some non-GNU implementations of Fortran provide this intrinsic as
  73. only a function, not as a subroutine, or do not support the (optional)
  74. STATUS argument.
  75.  
  76.    *Warning:* Use of the `libf2c' run-time library function `signal_'
  77. directly (such as via `EXTERNAL SIGNAL') requires use of the `%VAL()'
  78. construct to pass an `INTEGER' value (such as `SIG_IGN' or `SIG_DFL')
  79. for the HANDLER argument.
  80.  
  81.    However, while `CALL SIGNAL(SIGNUM, %VAL(SIG_IGN))' works when
  82. `SIGNAL' is treated as an external procedure (and resolves, at link
  83. time, to `libf2c''s `signal_' routine), this construct is not valid
  84. when `SIGNAL' is recognized as the intrinsic of that name.
  85.  
  86.    Therefore, for maximum portability and reliability, code such
  87. references to the `SIGNAL' facility as follows:
  88.  
  89.      INTRINSIC SIGNAL
  90.      ...
  91.      CALL SIGNAL(SIGNUM, SIG_IGN)
  92.  
  93.    `g77' will compile such a call correctly, while other compilers will
  94. generally either do so as well or reject the `INTRINSIC SIGNAL'
  95. statement via a diagnostic, allowing you to take appropriate action.
  96.  
  97.    For information on other intrinsics with the same name: *Note Signal
  98. Intrinsic (function)::.
  99.  
  100. 
  101. File: g77.info,  Node: Sin Intrinsic,  Next: SinH Intrinsic,  Prev: Signal Intrinsic (subroutine),  Up: Table of Intrinsic Functions
  102.  
  103. Sin Intrinsic
  104. .............
  105.  
  106.      Sin(X)
  107.  
  108. Sin: `REAL' or `COMPLEX' function, the exact type being that of
  109. argument X.
  110.  
  111. X: `REAL' or `COMPLEX'; scalar; INTENT(IN).
  112.  
  113. Intrinsic groups: (standard FORTRAN 77).
  114.  
  115. Description:
  116.  
  117.    Returns the sine of X, an angle measured in radians.
  118.  
  119.    *Note ASin Intrinsic::, for the inverse of this function.
  120.  
  121. 
  122. File: g77.info,  Node: SinH Intrinsic,  Next: Sleep Intrinsic,  Prev: Sin Intrinsic,  Up: Table of Intrinsic Functions
  123.  
  124. SinH Intrinsic
  125. ..............
  126.  
  127.      SinH(X)
  128.  
  129. SinH: `REAL' function, the `KIND=' value of the type being that of
  130. argument X.
  131.  
  132. X: `REAL'; scalar; INTENT(IN).
  133.  
  134. Intrinsic groups: (standard FORTRAN 77).
  135.  
  136. Description:
  137.  
  138.    Returns the hyperbolic sine of X.
  139.  
  140. 
  141. File: g77.info,  Node: Sleep Intrinsic,  Next: Sngl Intrinsic,  Prev: SinH Intrinsic,  Up: Table of Intrinsic Functions
  142.  
  143. Sleep Intrinsic
  144. ...............
  145.  
  146.      CALL Sleep(SECONDS)
  147.  
  148. SECONDS: `INTEGER(KIND=1)'; scalar; INTENT(IN).
  149.  
  150. Intrinsic groups: `unix'.
  151.  
  152. Description:
  153.  
  154.    Causes the process to pause for SECONDS seconds.  See `sleep(2)'.
  155.  
  156. 
  157. File: g77.info,  Node: Sngl Intrinsic,  Next: Spacing Intrinsic,  Prev: Sleep Intrinsic,  Up: Table of Intrinsic Functions
  158.  
  159. Sngl Intrinsic
  160. ..............
  161.  
  162.      Sngl(A)
  163.  
  164. Sngl: `REAL(KIND=1)' function.
  165.  
  166. A: `REAL(KIND=2)'; scalar; INTENT(IN).
  167.  
  168. Intrinsic groups: (standard FORTRAN 77).
  169.  
  170. Description:
  171.  
  172.    Archaic form of `REAL()' that is specific to one type for A.  *Note
  173. Real Intrinsic::.
  174.  
  175. 
  176. File: g77.info,  Node: Spacing Intrinsic,  Next: Spread Intrinsic,  Prev: Sngl Intrinsic,  Up: Table of Intrinsic Functions
  177.  
  178. Spacing Intrinsic
  179. .................
  180.  
  181.    This intrinsic is not yet implemented.  The name is, however,
  182. reserved as an intrinsic.  Use `EXTERNAL Spacing' to use this name for
  183. an external procedure.
  184.  
  185. 
  186. File: g77.info,  Node: Spread Intrinsic,  Next: SqRt Intrinsic,  Prev: Spacing Intrinsic,  Up: Table of Intrinsic Functions
  187.  
  188. Spread Intrinsic
  189. ................
  190.  
  191.    This intrinsic is not yet implemented.  The name is, however,
  192. reserved as an intrinsic.  Use `EXTERNAL Spread' to use this name for an
  193. external procedure.
  194.  
  195. 
  196. File: g77.info,  Node: SqRt Intrinsic,  Next: SRand Intrinsic,  Prev: Spread Intrinsic,  Up: Table of Intrinsic Functions
  197.  
  198. SqRt Intrinsic
  199. ..............
  200.  
  201.      SqRt(X)
  202.  
  203. SqRt: `REAL' or `COMPLEX' function, the exact type being that of
  204. argument X.
  205.  
  206. X: `REAL' or `COMPLEX'; scalar; INTENT(IN).
  207.  
  208. Intrinsic groups: (standard FORTRAN 77).
  209.  
  210. Description:
  211.  
  212.    Returns the square root of X, which must not be negative.
  213.  
  214.    To calculate and represent the square root of a negative number,
  215. complex arithmetic must be used.  For example, `SQRT(COMPLEX(X))'.
  216.  
  217.    The inverse of this function is `SQRT(X) * SQRT(X)'.
  218.  
  219. 
  220. File: g77.info,  Node: SRand Intrinsic,  Next: Stat Intrinsic (subroutine),  Prev: SqRt Intrinsic,  Up: Table of Intrinsic Functions
  221.  
  222. SRand Intrinsic
  223. ...............
  224.  
  225.      CALL SRand(SEED)
  226.  
  227. SEED: `INTEGER'; scalar; INTENT(IN).
  228.  
  229. Intrinsic groups: `unix'.
  230.  
  231. Description:
  232.  
  233.    Reinitialises the generator with the seed in SEED.  *Note IRand
  234. Intrinsic::.  *Note Rand Intrinsic::.
  235.  
  236. 
  237. File: g77.info,  Node: Stat Intrinsic (subroutine),  Next: Stat Intrinsic (function),  Prev: SRand Intrinsic,  Up: Table of Intrinsic Functions
  238.  
  239. Stat Intrinsic (subroutine)
  240. ...........................
  241.  
  242.      CALL Stat(FILE, SARRAY, STATUS)
  243.  
  244. FILE: `CHARACTER'; scalar; INTENT(IN).
  245.  
  246. SARRAY: `INTEGER(KIND=1)'; DIMENSION(13); INTENT(OUT).
  247.  
  248. STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).
  249.  
  250. Intrinsic groups: `unix'.
  251.  
  252. Description:
  253.  
  254.    Obtains data about the given file FILE and places them in the array
  255. SARRAY.  A null character (`CHAR(0)') marks the end of the name in
  256. FILE--otherwise, trailing blanks in FILE are ignored.  The values in
  257. this array are extracted from the `stat' structure as returned by
  258. `fstat(2)' q.v., as follows:
  259.  
  260.   1. Device ID
  261.  
  262.   2. Inode number
  263.  
  264.   3. File mode
  265.  
  266.   4. Number of links
  267.  
  268.   5. Owner's uid
  269.  
  270.   6. Owner's gid
  271.  
  272.   7. ID of device containing directory entry for file (0 if not
  273.      available)
  274.  
  275.   8. File size (bytes)
  276.  
  277.   9. Last access time
  278.  
  279.  10. Last modification time
  280.  
  281.  11. Last file status change time
  282.  
  283.  12. Preferred I/O block size (-1 if not available)
  284.  
  285.  13. Number of blocks allocated (-1 if not available)
  286.  
  287.    Not all these elements are relevant on all systems.  If an element
  288. is not relevant, it is returned as 0.
  289.  
  290.    If the STATUS argument is supplied, it contains 0 on success or a
  291. non-zero error code upon return.
  292.  
  293.    Some non-GNU implementations of Fortran provide this intrinsic as
  294. only a function, not as a subroutine, or do not support the (optional)
  295. STATUS argument.
  296.  
  297.    For information on other intrinsics with the same name: *Note Stat
  298. Intrinsic (function)::.
  299.  
  300. 
  301. File: g77.info,  Node: Stat Intrinsic (function),  Next: Sum Intrinsic,  Prev: Stat Intrinsic (subroutine),  Up: Table of Intrinsic Functions
  302.  
  303. Stat Intrinsic (function)
  304. .........................
  305.  
  306.      Stat(FILE, SARRAY)
  307.  
  308. Stat: `INTEGER(KIND=1)' function.
  309.  
  310. FILE: `CHARACTER'; scalar; INTENT(IN).
  311.  
  312. SARRAY: `INTEGER(KIND=1)'; DIMENSION(13); INTENT(OUT).
  313.  
  314. Intrinsic groups: `unix'.
  315.  
  316. Description:
  317.  
  318.    Obtains data about the given file FILE and places them in the array
  319. SARRAY.  A null character (`CHAR(0)') marks the end of the name in
  320. FILE--otherwise, trailing blanks in FILE are ignored.  The values in
  321. this array are extracted from the `stat' structure as returned by
  322. `fstat(2)' q.v., as follows:
  323.  
  324.   1. Device ID
  325.  
  326.   2. Inode number
  327.  
  328.   3. File mode
  329.  
  330.   4. Number of links
  331.  
  332.   5. Owner's uid
  333.  
  334.   6. Owner's gid
  335.  
  336.   7. ID of device containing directory entry for file (0 if not
  337.      available)
  338.  
  339.   8. File size (bytes)
  340.  
  341.   9. Last access time
  342.  
  343.  10. Last modification time
  344.  
  345.  11. Last file status change time
  346.  
  347.  12. Preferred I/O block size (-1 if not available)
  348.  
  349.  13. Number of blocks allocated (-1 if not available)
  350.  
  351.    Not all these elements are relevant on all systems.  If an element
  352. is not relevant, it is returned as 0.
  353.  
  354.    Returns 0 on success or a non-zero error code.
  355.  
  356.    For information on other intrinsics with the same name: *Note Stat
  357. Intrinsic (subroutine)::.
  358.  
  359. 
  360. File: g77.info,  Node: Sum Intrinsic,  Next: SymLnk Intrinsic (subroutine),  Prev: Stat Intrinsic (function),  Up: Table of Intrinsic Functions
  361.  
  362. Sum Intrinsic
  363. .............
  364.  
  365.    This intrinsic is not yet implemented.  The name is, however,
  366. reserved as an intrinsic.  Use `EXTERNAL Sum' to use this name for an
  367. external procedure.
  368.  
  369. 
  370. File: g77.info,  Node: SymLnk Intrinsic (subroutine),  Next: System Intrinsic (subroutine),  Prev: Sum Intrinsic,  Up: Table of Intrinsic Functions
  371.  
  372. SymLnk Intrinsic (subroutine)
  373. .............................
  374.  
  375.      CALL SymLnk(PATH1, PATH2, STATUS)
  376.  
  377. PATH1: `CHARACTER'; scalar; INTENT(IN).
  378.  
  379. PATH2: `CHARACTER'; scalar; INTENT(IN).
  380.  
  381. STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).
  382.  
  383. Intrinsic groups: `unix'.
  384.  
  385. Description:
  386.  
  387.    Makes a symbolic link from file PATH1 to PATH2.  A null character
  388. (`CHAR(0)') marks the end of the names in PATH1 and PATH2--otherwise,
  389. trailing blanks in PATH1 and PATH2 are ignored.  If the STATUS argument
  390. is supplied, it contains 0 on success or a non-zero error code upon
  391. return (`ENOSYS' if the system does not provide `symlink(2)').
  392.  
  393.    Some non-GNU implementations of Fortran provide this intrinsic as
  394. only a function, not as a subroutine, or do not support the (optional)
  395. STATUS argument.
  396.  
  397.    For information on other intrinsics with the same name: *Note SymLnk
  398. Intrinsic (function)::.
  399.  
  400. 
  401. File: g77.info,  Node: System Intrinsic (subroutine),  Next: System_Clock Intrinsic,  Prev: SymLnk Intrinsic (subroutine),  Up: Table of Intrinsic Functions
  402.  
  403. System Intrinsic (subroutine)
  404. .............................
  405.  
  406.      CALL System(COMMAND, STATUS)
  407.  
  408. COMMAND: `CHARACTER'; scalar; INTENT(IN).
  409.  
  410. STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).
  411.  
  412. Intrinsic groups: `unix'.
  413.  
  414. Description:
  415.  
  416.    Passes the command COMMAND to a shell (see `system(3)').  If
  417. argument STATUS is present, it contains the value returned by
  418. `system(3)', presumably 0 if the shell command succeeded.  Note that
  419. which shell is used to invoke the command is system-dependent and
  420. environment-dependent.
  421.  
  422.    Some non-GNU implementations of Fortran provide this intrinsic as
  423. only a function, not as a subroutine, or do not support the (optional)
  424. STATUS argument.
  425.  
  426.    For information on other intrinsics with the same name: *Note System
  427. Intrinsic (function)::.
  428.  
  429. 
  430. File: g77.info,  Node: System_Clock Intrinsic,  Next: Tan Intrinsic,  Prev: System Intrinsic (subroutine),  Up: Table of Intrinsic Functions
  431.  
  432. System_Clock Intrinsic
  433. ......................
  434.  
  435.      CALL System_Clock(COUNT, RATE, MAX)
  436.  
  437. COUNT: `INTEGER(KIND=1)'; scalar; INTENT(OUT).
  438.  
  439. RATE: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).
  440.  
  441. MAX: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).
  442.  
  443. Intrinsic groups: `f90'.
  444.  
  445. Description:
  446.  
  447.    Returns in COUNT the current value of the system clock; this is the
  448. value returned by the UNIX function `times(2)' in this implementation,
  449. but isn't in general.  RATE is the number of clock ticks per second and
  450. MAX is the maximum value this can take, which isn't very useful in this
  451. implementation since it's just the maximum C `unsigned int' value.
  452.  
  453.    On some systems, the underlying timings are represented using types
  454. with sufficiently small limits that overflows (wraparounds) are
  455. possible, such as 32-bit types.  Therefore, the values returned by this
  456. intrinsic might be, or become, negative, or numerically less than
  457. previous values, during a single run of the compiled program.
  458.  
  459. 
  460. File: g77.info,  Node: Tan Intrinsic,  Next: TanH Intrinsic,  Prev: System_Clock Intrinsic,  Up: Table of Intrinsic Functions
  461.  
  462. Tan Intrinsic
  463. .............
  464.  
  465.      Tan(X)
  466.  
  467. Tan: `REAL' function, the `KIND=' value of the type being that of
  468. argument X.
  469.  
  470. X: `REAL'; scalar; INTENT(IN).
  471.  
  472. Intrinsic groups: (standard FORTRAN 77).
  473.  
  474. Description:
  475.  
  476.    Returns the tangent of X, an angle measured in radians.
  477.  
  478.    *Note ATan Intrinsic::, for the inverse of this function.
  479.  
  480. 
  481. File: g77.info,  Node: TanH Intrinsic,  Next: Time Intrinsic (UNIX),  Prev: Tan Intrinsic,  Up: Table of Intrinsic Functions
  482.  
  483. TanH Intrinsic
  484. ..............
  485.  
  486.      TanH(X)
  487.  
  488. TanH: `REAL' function, the `KIND=' value of the type being that of
  489. argument X.
  490.  
  491. X: `REAL'; scalar; INTENT(IN).
  492.  
  493. Intrinsic groups: (standard FORTRAN 77).
  494.  
  495. Description:
  496.  
  497.    Returns the hyperbolic tangent of X.
  498.  
  499. 
  500. File: g77.info,  Node: Time Intrinsic (UNIX),  Next: Time8 Intrinsic,  Prev: TanH Intrinsic,  Up: Table of Intrinsic Functions
  501.  
  502. Time Intrinsic (UNIX)
  503. .....................
  504.  
  505.      Time()
  506.  
  507. Time: `INTEGER(KIND=1)' function.
  508.  
  509. Intrinsic groups: `unix'.
  510.  
  511. Description:
  512.  
  513.    Returns the current time encoded as an integer (in the manner of the
  514. UNIX function `time(3)').  This value is suitable for passing to
  515. `CTIME', `GMTIME', and `LTIME'.
  516.  
  517.    This intrinsic is not fully portable, such as to systems with 32-bit
  518. `INTEGER' types but supporting times wider than 32 bits.  Therefore,
  519. the values returned by this intrinsic might be, or become, negative, or
  520. numerically less than previous values, during a single run of the
  521. compiled program.
  522.  
  523.    *Note Time8 Intrinsic::, for information on a similar intrinsic that
  524. might be portable to more GNU Fortran implementations, though to fewer
  525. Fortran compilers.
  526.  
  527.    For information on other intrinsics with the same name: *Note Time
  528. Intrinsic (VXT)::.
  529.  
  530. 
  531. File: g77.info,  Node: Time8 Intrinsic,  Next: Tiny Intrinsic,  Prev: Time Intrinsic (UNIX),  Up: Table of Intrinsic Functions
  532.  
  533. Time8 Intrinsic
  534. ...............
  535.  
  536.      Time8()
  537.  
  538. Time8: `INTEGER(KIND=2)' function.
  539.  
  540. Intrinsic groups: `unix'.
  541.  
  542. Description:
  543.  
  544.    Returns the current time encoded as a long integer (in the manner of
  545. the UNIX function `time(3)').  This value is suitable for passing to
  546. `CTIME', `GMTIME', and `LTIME'.
  547.  
  548.    *Warning:* this intrinsic does not increase the range of the timing
  549. values over that returned by `time(3)'.  On a system with a 32-bit
  550. `time(3)', `TIME8' will return a 32-bit value, even though converted to
  551. an `INTEGER(KIND=2)' value.  That means overflows of the 32-bit value
  552. can still occur.  Therefore, the values returned by this intrinsic
  553. might be, or become, negative, or numerically less than previous values,
  554. during a single run of the compiled program.
  555.  
  556.    No Fortran implementations other than GNU Fortran are known to
  557. support this intrinsic at the time of this writing.  *Note Time
  558. Intrinsic (UNIX)::, for information on a similar intrinsic that might
  559. be portable to more Fortran compilers, though to fewer GNU Fortran
  560. implementations.
  561.  
  562. 
  563. File: g77.info,  Node: Tiny Intrinsic,  Next: Transfer Intrinsic,  Prev: Time8 Intrinsic,  Up: Table of Intrinsic Functions
  564.  
  565. Tiny Intrinsic
  566. ..............
  567.  
  568.    This intrinsic is not yet implemented.  The name is, however,
  569. reserved as an intrinsic.  Use `EXTERNAL Tiny' to use this name for an
  570. external procedure.
  571.  
  572. 
  573. File: g77.info,  Node: Transfer Intrinsic,  Next: Transpose Intrinsic,  Prev: Tiny Intrinsic,  Up: Table of Intrinsic Functions
  574.  
  575. Transfer Intrinsic
  576. ..................
  577.  
  578.    This intrinsic is not yet implemented.  The name is, however,
  579. reserved as an intrinsic.  Use `EXTERNAL Transfer' to use this name for
  580. an external procedure.
  581.  
  582. 
  583. File: g77.info,  Node: Transpose Intrinsic,  Next: Trim Intrinsic,  Prev: Transfer Intrinsic,  Up: Table of Intrinsic Functions
  584.  
  585. Transpose Intrinsic
  586. ...................
  587.  
  588.    This intrinsic is not yet implemented.  The name is, however,
  589. reserved as an intrinsic.  Use `EXTERNAL Transpose' to use this name
  590. for an external procedure.
  591.  
  592. 
  593. File: g77.info,  Node: Trim Intrinsic,  Next: TtyNam Intrinsic (subroutine),  Prev: Transpose Intrinsic,  Up: Table of Intrinsic Functions
  594.  
  595. Trim Intrinsic
  596. ..............
  597.  
  598.    This intrinsic is not yet implemented.  The name is, however,
  599. reserved as an intrinsic.  Use `EXTERNAL Trim' to use this name for an
  600. external procedure.
  601.  
  602. 
  603. File: g77.info,  Node: TtyNam Intrinsic (subroutine),  Next: TtyNam Intrinsic (function),  Prev: Trim Intrinsic,  Up: Table of Intrinsic Functions
  604.  
  605. TtyNam Intrinsic (subroutine)
  606. .............................
  607.  
  608.      CALL TtyNam(UNIT, NAME)
  609.  
  610. UNIT: `INTEGER'; scalar; INTENT(IN).
  611.  
  612. NAME: `CHARACTER'; scalar; INTENT(OUT).
  613.  
  614. Intrinsic groups: `unix'.
  615.  
  616. Description:
  617.  
  618.    Sets NAME to the name of the terminal device open on logical unit
  619. UNIT or to a blank string if UNIT is not connected to a terminal.
  620.  
  621.    Some non-GNU implementations of Fortran provide this intrinsic as
  622. only a function, not as a subroutine.
  623.  
  624.    For information on other intrinsics with the same name: *Note TtyNam
  625. Intrinsic (function)::.
  626.  
  627. 
  628. File: g77.info,  Node: TtyNam Intrinsic (function),  Next: UBound Intrinsic,  Prev: TtyNam Intrinsic (subroutine),  Up: Table of Intrinsic Functions
  629.  
  630. TtyNam Intrinsic (function)
  631. ...........................
  632.  
  633.      TtyNam(UNIT)
  634.  
  635. TtyNam: `CHARACTER*(*)' function.
  636.  
  637. UNIT: `INTEGER'; scalar; INTENT(IN).
  638.  
  639. Intrinsic groups: `unix'.
  640.  
  641. Description:
  642.  
  643.    Returns the name of the terminal device open on logical unit UNIT or
  644. a blank string if UNIT is not connected to a terminal.
  645.  
  646.    For information on other intrinsics with the same name: *Note TtyNam
  647. Intrinsic (subroutine)::.
  648.  
  649. 
  650. File: g77.info,  Node: UBound Intrinsic,  Next: UMask Intrinsic (subroutine),  Prev: TtyNam Intrinsic (function),  Up: Table of Intrinsic Functions
  651.  
  652. UBound Intrinsic
  653. ................
  654.  
  655.    This intrinsic is not yet implemented.  The name is, however,
  656. reserved as an intrinsic.  Use `EXTERNAL UBound' to use this name for an
  657. external procedure.
  658.  
  659. 
  660. File: g77.info,  Node: UMask Intrinsic (subroutine),  Next: Unlink Intrinsic (subroutine),  Prev: UBound Intrinsic,  Up: Table of Intrinsic Functions
  661.  
  662. UMask Intrinsic (subroutine)
  663. ............................
  664.  
  665.      CALL UMask(MASK, OLD)
  666.  
  667. MASK: `INTEGER'; scalar; INTENT(IN).
  668.  
  669. OLD: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).
  670.  
  671. Intrinsic groups: `unix'.
  672.  
  673. Description:
  674.  
  675.    Sets the file creation mask to MASK and returns the old value in
  676. argument OLD if it is supplied.  See `umask(2)'.
  677.  
  678.    Some non-GNU implementations of Fortran provide this intrinsic as
  679. only a function, not as a subroutine.
  680.  
  681.    For information on other intrinsics with the same name: *Note UMask
  682. Intrinsic (function)::.
  683.  
  684. 
  685. File: g77.info,  Node: Unlink Intrinsic (subroutine),  Next: Unpack Intrinsic,  Prev: UMask Intrinsic (subroutine),  Up: Table of Intrinsic Functions
  686.  
  687. Unlink Intrinsic (subroutine)
  688. .............................
  689.  
  690.      CALL Unlink(FILE, STATUS)
  691.  
  692. FILE: `CHARACTER'; scalar; INTENT(IN).
  693.  
  694. STATUS: `INTEGER(KIND=1)'; OPTIONAL; scalar; INTENT(OUT).
  695.  
  696. Intrinsic groups: `unix'.
  697.  
  698. Description:
  699.  
  700.    Unlink the file FILE.  A null character (`CHAR(0)') marks the end of
  701. the name in FILE--otherwise, trailing blanks in FILE are ignored.  If
  702. the STATUS argument is supplied, it contains 0 on success or a non-zero
  703. error code upon return.  See `unlink(2)'.
  704.  
  705.    Some non-GNU implementations of Fortran provide this intrinsic as
  706. only a function, not as a subroutine, or do not support the (optional)
  707. STATUS argument.
  708.  
  709.    For information on other intrinsics with the same name: *Note Unlink
  710. Intrinsic (function)::.
  711.  
  712. 
  713. File: g77.info,  Node: Unpack Intrinsic,  Next: Verify Intrinsic,  Prev: Unlink Intrinsic (subroutine),  Up: Table of Intrinsic Functions
  714.  
  715. Unpack Intrinsic
  716. ................
  717.  
  718.    This intrinsic is not yet implemented.  The name is, however,
  719. reserved as an intrinsic.  Use `EXTERNAL Unpack' to use this name for an
  720. external procedure.
  721.  
  722. 
  723. File: g77.info,  Node: Verify Intrinsic,  Next: XOr Intrinsic,  Prev: Unpack Intrinsic,  Up: Table of Intrinsic Functions
  724.  
  725. Verify Intrinsic
  726. ................
  727.  
  728.    This intrinsic is not yet implemented.  The name is, however,
  729. reserved as an intrinsic.  Use `EXTERNAL Verify' to use this name for an
  730. external procedure.
  731.  
  732. 
  733. File: g77.info,  Node: XOr Intrinsic,  Next: ZAbs Intrinsic,  Prev: Verify Intrinsic,  Up: Table of Intrinsic Functions
  734.  
  735. XOr Intrinsic
  736. .............
  737.  
  738.      XOr(I, J)
  739.  
  740. XOr: `INTEGER' or `LOGICAL' function, the exact type being the result
  741. of cross-promoting the types of all the arguments.
  742.  
  743. I: `INTEGER' or `LOGICAL'; scalar; INTENT(IN).
  744.  
  745. J: `INTEGER' or `LOGICAL'; scalar; INTENT(IN).
  746.  
  747. Intrinsic groups: `f2c'.
  748.  
  749. Description:
  750.  
  751.    Returns value resulting from boolean exclusive-OR of pair of bits in
  752. each of I and J.
  753.  
  754. 
  755. File: g77.info,  Node: ZAbs Intrinsic,  Next: ZCos Intrinsic,  Prev: XOr Intrinsic,  Up: Table of Intrinsic Functions
  756.  
  757. ZAbs Intrinsic
  758. ..............
  759.  
  760.      ZAbs(A)
  761.  
  762. ZAbs: `REAL(KIND=2)' function.
  763.  
  764. A: `COMPLEX(KIND=2)'; scalar; INTENT(IN).
  765.  
  766. Intrinsic groups: `f2c'.
  767.  
  768. Description:
  769.  
  770.    Archaic form of `ABS()' that is specific to one type for A.  *Note
  771. Abs Intrinsic::.
  772.  
  773. 
  774. File: g77.info,  Node: ZCos Intrinsic,  Next: ZExp Intrinsic,  Prev: ZAbs Intrinsic,  Up: Table of Intrinsic Functions
  775.  
  776. ZCos Intrinsic
  777. ..............
  778.  
  779.      ZCos(X)
  780.  
  781. ZCos: `COMPLEX(KIND=2)' function.
  782.  
  783. X: `COMPLEX(KIND=2)'; scalar; INTENT(IN).
  784.  
  785. Intrinsic groups: `f2c'.
  786.  
  787. Description:
  788.  
  789.    Archaic form of `COS()' that is specific to one type for X.  *Note
  790. Cos Intrinsic::.
  791.  
  792. 
  793. File: g77.info,  Node: ZExp Intrinsic,  Next: ZLog Intrinsic,  Prev: ZCos Intrinsic,  Up: Table of Intrinsic Functions
  794.  
  795. ZExp Intrinsic
  796. ..............
  797.  
  798.      ZExp(X)
  799.  
  800. ZExp: `COMPLEX(KIND=2)' function.
  801.  
  802. X: `COMPLEX(KIND=2)'; scalar; INTENT(IN).
  803.  
  804. Intrinsic groups: `f2c'.
  805.  
  806. Description:
  807.  
  808.    Archaic form of `EXP()' that is specific to one type for X.  *Note
  809. Exp Intrinsic::.
  810.  
  811. 
  812. File: g77.info,  Node: ZLog Intrinsic,  Next: ZSin Intrinsic,  Prev: ZExp Intrinsic,  Up: Table of Intrinsic Functions
  813.  
  814. ZLog Intrinsic
  815. ..............
  816.  
  817.      ZLog(X)
  818.  
  819. ZLog: `COMPLEX(KIND=2)' function.
  820.  
  821. X: `COMPLEX(KIND=2)'; scalar; INTENT(IN).
  822.  
  823. Intrinsic groups: `f2c'.
  824.  
  825. Description:
  826.  
  827.    Archaic form of `LOG()' that is specific to one type for X.  *Note
  828. Log Intrinsic::.
  829.  
  830. 
  831. File: g77.info,  Node: ZSin Intrinsic,  Next: ZSqRt Intrinsic,  Prev: ZLog Intrinsic,  Up: Table of Intrinsic Functions
  832.  
  833. ZSin Intrinsic
  834. ..............
  835.  
  836.      ZSin(X)
  837.  
  838. ZSin: `COMPLEX(KIND=2)' function.
  839.  
  840. X: `COMPLEX(KIND=2)'; scalar; INTENT(IN).
  841.  
  842. Intrinsic groups: `f2c'.
  843.  
  844. Description:
  845.  
  846.    Archaic form of `SIN()' that is specific to one type for X.  *Note
  847. Sin Intrinsic::.
  848.  
  849. 
  850. File: g77.info,  Node: ZSqRt Intrinsic,  Prev: ZSin Intrinsic,  Up: Table of Intrinsic Functions
  851.  
  852. ZSqRt Intrinsic
  853. ...............
  854.  
  855.      ZSqRt(X)
  856.  
  857. ZSqRt: `COMPLEX(KIND=2)' function.
  858.  
  859. X: `COMPLEX(KIND=2)'; scalar; INTENT(IN).
  860.  
  861. Intrinsic groups: `f2c'.
  862.  
  863. Description:
  864.  
  865.    Archaic form of `SQRT()' that is specific to one type for X.  *Note
  866. SqRt Intrinsic::.
  867.  
  868. 
  869. File: g77.info,  Node: Scope and Classes of Names,  Next: I/O,  Prev: Functions and Subroutines,  Up: Language
  870.  
  871. Scope and Classes of Symbolic Names
  872. ===================================
  873.  
  874.    (The following information augments or overrides the information in
  875. Chapter 18 of ANSI X3.9-1978 FORTRAN 77 in specifying the GNU Fortran
  876. language.  Chapter 18 of that document otherwise serves as the basis
  877. for the relevant aspects of GNU Fortran.)
  878.  
  879. * Menu:
  880.  
  881. * Underscores in Symbol Names::
  882.  
  883. 
  884. File: g77.info,  Node: Underscores in Symbol Names,  Up: Scope and Classes of Names
  885.  
  886. Underscores in Symbol Names
  887. ---------------------------
  888.  
  889.    Underscores (`_') are accepted in symbol names after the first
  890. character (which must be a letter).
  891.  
  892. 
  893. File: g77.info,  Node: I/O,  Next: Fortran 90 Features,  Prev: Scope and Classes of Names,  Up: Language
  894.  
  895. I/O
  896. ===
  897.  
  898.    A dollar sign at the end of an output format specification suppresses
  899. the newline at the end of the output.
  900.  
  901.    Edit descriptors in `FORMAT' statements may contain compile-time
  902. `INTEGER' constant expressions in angle brackets, such as
  903.      10    FORMAT (I<WIDTH>)
  904.  
  905.    The `OPEN' specifier `NAME=' is equivalent to `FILE='.
  906.  
  907.    These Fortran 90 features are supported:
  908.    * The `O' and `Z' edit descriptors are supported for I/O of integers
  909.      in octal and hexadecimal formats, respectively.
  910.  
  911.    * The `FILE=' specifier may be omitted in an `OPEN' statement if
  912.      `STATUS='SCRATCH'' is supplied.  The `STATUS='REPLACE'' specifier
  913.      is supported.
  914.  
  915. 
  916. File: g77.info,  Node: Fortran 90 Features,  Prev: I/O,  Up: Language
  917.  
  918. Fortran 90 Features
  919. ===================
  920.  
  921.    For convenience this section collects a list (probably incomplete) of
  922. the Fortran 90 features supported by the GNU Fortran language, even if
  923. they are documented elsewhere.  *Note Characters, Lines, and Execution
  924. Sequence: Characters Lines Sequence, for information on additional
  925. fixed source form lexical issues.  Further, the free source form is
  926. supported through the `-ffree-form' option.  Other Fortran 90 features
  927. can be turned on by the `-ff90' option; see *Note Fortran 90::..  For
  928. information on the Fortran 90 intrinsics available, see *Note Table of
  929. Intrinsic Functions::..
  930.  
  931. Automatic arrays in procedures
  932.  
  933. Character assignments
  934.      In character assignments, the variable being assigned may occur on
  935.      the right hand side of the assignment.
  936.  
  937. Character strings
  938.      Strings may have zero length and substrings of character constants
  939.      are permitted.  Character constants may be enclosed in double
  940.      quotes (`"') as well as single quotes.  *Note Character Type::.
  941.  
  942. Construct names
  943.      (Symbolic tags on blocks.)  *Note Construct Names::.
  944.  
  945. `CYCLE' and `EXIT'
  946.      *Note The `CYCLE' and `EXIT' Statements: CYCLE and EXIT.
  947.  
  948. `DOUBLE COMPLEX'
  949.      *Note `DOUBLE COMPLEX' Statement: DOUBLE COMPLEX.
  950.  
  951. `DO WHILE'
  952.      *Note DO WHILE::.
  953.  
  954. `END' decoration
  955.      *Note Statements::.
  956.  
  957. `END DO'
  958.      *Note END DO::.
  959.  
  960. `KIND'
  961.  
  962. `IMPLICIT NONE'
  963.  
  964. `INCLUDE' statements
  965.      *Note INCLUDE::.
  966.  
  967. List-directed and namelist I/O on internal files
  968.  
  969. Binary, octal and hexadecimal constants
  970.      These are supported more generally than required by Fortran 90.
  971.      *Note Integer Type::.
  972.  
  973. `O' and `Z' edit descriptors
  974.  
  975. `NAMELIST'
  976.      *Note NAMELIST::.
  977.  
  978. `OPEN' specifiers
  979.      `STATUS='REPLACE'' is supported.  The `FILE=' specifier may be
  980.      omitted in an `OPEN' statement if `STATUS='SCRATCH'' is supplied.
  981.  
  982. `FORMAT' edit descriptors
  983.      The `Z' edit descriptor is supported.
  984.  
  985. Relational operators
  986.      The operators `<', `<=', `==', `/=', `>' and `>=' may be used
  987.      instead of `.LT.', `.LE.', `.EQ.', `.NE.', `.GT.' and `.GE.'
  988.      respectively.
  989.  
  990. `SELECT CASE'
  991.      Not fully implemented.  *Note `SELECT CASE' on `CHARACTER' Type:
  992.      SELECT CASE on CHARACTER Type.
  993.  
  994. Specification statements
  995.      A limited subset of the Fortran 90 syntax and semantics for
  996.      variable declarations is supported, including `KIND'.  *Note Kind
  997.      Notation::.  (`KIND' is of limited usefulness in the absence of the
  998.      `KIND'-related intrinsics, since these intrinsics permit writing
  999.      more widely portable code.)  An example of supported `KIND' usage
  1000.      is:
  1001.           INTEGER (KIND=1) :: FOO=1, BAR=2
  1002.           CHARACTER (LEN=3) FOO
  1003.      `PARAMETER' and `DIMENSION' attributes aren't supported.
  1004.  
  1005. 
  1006. File: g77.info,  Node: Other Dialects,  Next: Other Compilers,  Prev: Compiler,  Up: Top
  1007.  
  1008. Other Dialects
  1009. **************
  1010.  
  1011.    GNU Fortran supports a variety of features that are not considered
  1012. part of the GNU Fortran language itself, but are representative of
  1013. various dialects of Fortran that `g77' supports in whole or in part.
  1014.  
  1015.    Any of the features listed below might be disallowed by `g77' unless
  1016. some command-line option is specified.  Currently, some of the features
  1017. are accepted using the default invocation of `g77', but that might
  1018. change in the future.
  1019.  
  1020.    *Note: This portion of the documentation definitely needs a lot of
  1021. work!*
  1022.  
  1023. * Menu:
  1024.  
  1025. * Source Form::       Details of fixed-form and free-form source.
  1026. * Trailing Comment::  Use of `/*' to start a comment.
  1027. * Debug Line::        Use of `D' in column 1.
  1028. * Dollar Signs::      Use of `$' in symbolic names.
  1029. * Case Sensitivity::  Uppercase and lowercase in source files.
  1030. * VXT Fortran::       ...versus the GNU Fortran language.
  1031. * Fortran 90::        ...versus the GNU Fortran language.
  1032. * Pedantic Compilation::  Enforcing the standard.
  1033. * Distensions::       Misfeatures supported by GNU Fortran.
  1034.  
  1035. 
  1036. File: g77.info,  Node: Source Form,  Next: Trailing Comment,  Up: Other Dialects
  1037.  
  1038. Source Form
  1039. ===========
  1040.  
  1041.    GNU Fortran accepts programs written in either fixed form or free
  1042. form.
  1043.  
  1044.    Fixed form corresponds to ANSI FORTRAN 77 (plus popular extensions,
  1045. such as allowing tabs) and Fortran 90's fixed form.
  1046.  
  1047.    Free form corresponds to Fortran 90's free form (though possibly not
  1048. entirely up-to-date, and without complaining about some things that for
  1049. which Fortran 90 requires diagnostics, such as the spaces in the
  1050. constant in `R = 3 . 1').
  1051.  
  1052.    The way a Fortran compiler views source files depends entirely on the
  1053. implementation choices made for the compiler, since those choices are
  1054. explicitly left to the implementation by the published Fortran
  1055. standards.  GNU Fortran currently tries to be somewhat like a few
  1056. popular compilers (`f2c', Digital ("DEC") Fortran, and so on), though a
  1057. cleaner default definition along with more flexibility offered by
  1058. command-line options is likely to be offered in version 0.6.
  1059.  
  1060.    This section describes how `g77' interprets source lines.
  1061.  
  1062. * Menu:
  1063.  
  1064. * Carriage Returns::  Carriage returns ignored.
  1065. * Tabs::              Tabs converted to spaces.
  1066. * Short Lines::       Short lines padded with spaces (fixed-form only).
  1067. * Long Lines::        Long lines truncated.
  1068. * Ampersands::        Special Continuation Lines.
  1069.  
  1070. 
  1071. File: g77.info,  Node: Carriage Returns,  Next: Tabs,  Up: Source Form
  1072.  
  1073. Carriage Returns
  1074. ----------------
  1075.  
  1076.    Carriage returns (`\r') in source lines are ignored.  This is
  1077. somewhat different from `f2c', which seems to treat them as spaces
  1078. outside character/Hollerith constants, and encodes them as `\r' inside
  1079. such constants.
  1080.  
  1081. 
  1082. File: g77.info,  Node: Tabs,  Next: Short Lines,  Prev: Carriage Returns,  Up: Source Form
  1083.  
  1084. Tabs
  1085. ----
  1086.  
  1087.    A source line with a <TAB> character anywhere in it is treated as
  1088. entirely significant--however long it is--instead of ending in column
  1089. 72 (for fixed-form source) or 132 (for free-form source).  This also is
  1090. different from `f2c', which encodes tabs as `\t' (the ASCII <TAB>
  1091. character) inside character and Hollerith constants, but nevertheless
  1092. seems to treat the column position as if it had been affected by the
  1093. canonical tab positioning.
  1094.  
  1095.    `g77' effectively translates tabs to the appropriate number of
  1096. spaces (a la the default for the UNIX `expand' command) before doing
  1097. any other processing, other than (currently) noting whether a tab was
  1098. found on a line and using this information to decide how to interpret
  1099. the length of the line and continued constants.
  1100.  
  1101.    Note that this default behavior probably will change for version 0.6,
  1102. when it will presumably be available via a command-line option.  The
  1103. default as of version 0.6 is planned to be a "pure visual" model, where
  1104. tabs are immediately converted to spaces and otherwise have no effect,
  1105. so the way a typical user sees source lines produces a consistent
  1106. result no matter how the spacing in those source lines is actually
  1107. implemented via tabs, spaces, and trailing tabs/spaces before newline.
  1108. Command-line options are likely to be added to specify whether all or
  1109. just-tabbed lines are to be extended to 132 or full input-line length,
  1110. and perhaps even an option will be added to specify the truncated-line
  1111. behavior to which some Digital compilers default (and which affects the
  1112. way continued character/Hollerith constants are interpreted).
  1113.  
  1114. 
  1115. File: g77.info,  Node: Short Lines,  Next: Long Lines,  Prev: Tabs,  Up: Source Form
  1116.  
  1117. Short Lines
  1118. -----------
  1119.  
  1120.    Source lines shorter than the applicable fixed-form length are
  1121. treated as if they were padded with spaces to that length.  (None of
  1122. this is relevant to source files written in free form.)
  1123.  
  1124.    This affects only continued character and Hollerith constants, and
  1125. is a different interpretation than provided by some other popular
  1126. compilers (although a bit more consistent with the traditional
  1127. punched-card basis of Fortran and the way the Fortran standard
  1128. expressed fixed source form).
  1129.  
  1130.    `g77' might someday offer an option to warn about cases where
  1131. differences might be seen as a result of this treatment, and perhaps an
  1132. option to specify the alternate behavior as well.
  1133.  
  1134.    Note that this padding cannot apply to lines that are effectively of
  1135. infinite length--such lines are specified using command-line options
  1136. like `-ffixed-line-length-none', for example.
  1137.  
  1138. 
  1139. File: g77.info,  Node: Long Lines,  Next: Ampersands,  Prev: Short Lines,  Up: Source Form
  1140.  
  1141. Long Lines
  1142. ----------
  1143.  
  1144.    Source lines longer than the applicable length are truncated to that
  1145. length.  Currently, `g77' does not warn if the truncated characters are
  1146. not spaces, to accommodate existing code written for systems that
  1147. treated truncated text as commentary (especially in columns 73 through
  1148. 80).
  1149.  
  1150.    *Note Options Controlling Fortran Dialect: Fortran Dialect Options,
  1151. for information on the `-ffixed-line-length-N' option, which can be
  1152. used to set the line length applicable to fixed-form source files.
  1153.  
  1154. 
  1155. File: g77.info,  Node: Ampersands,  Prev: Long Lines,  Up: Source Form
  1156.  
  1157. Ampersand Continuation Line
  1158. ---------------------------
  1159.  
  1160.    A `&' in column 1 of fixed-form source denotes an arbitrary-length
  1161. continuation line, imitating the behavior of `f2c'.
  1162.  
  1163. 
  1164. File: g77.info,  Node: Trailing Comment,  Next: Debug Line,  Prev: Source Form,  Up: Other Dialects
  1165.  
  1166. Trailing Comment
  1167. ================
  1168.  
  1169.    `g77' supports use of `/*' to start a trailing comment.  In the GNU
  1170. Fortran language, `!' is used for this purpose.
  1171.  
  1172.    `/*' is not in the GNU Fortran language because the use of `/*' in a
  1173. program might suggest to some readers that a block, not trailing,
  1174. comment is started (and thus ended by `*/', not end of line), since
  1175. that is the meaning of `/*' in C.
  1176.  
  1177.    Also, such readers might think they can use `//' to start a trailing
  1178. comment as an alternative to `/*', but `//' already denotes
  1179. concatenation, and such a "comment" might actually result in a program
  1180. that compiles without error (though it would likely behave incorrectly).
  1181.  
  1182. 
  1183. File: g77.info,  Node: Debug Line,  Next: Dollar Signs,  Prev: Trailing Comment,  Up: Other Dialects
  1184.  
  1185. Debug Line
  1186. ==========
  1187.  
  1188.    Use of `D' or `d' as the first character (column 1) of a source line
  1189. denotes a debug line.
  1190.  
  1191.    In turn, a debug line is treated as either a comment line or a
  1192. normal line, depending on whether debug lines are enabled.
  1193.  
  1194.    When treated as a comment line, a line beginning with `D' or `d' is
  1195. treated as if it the first character was `C' or `c', respectively.
  1196. When treated as a normal line, such a line is treated as if the first
  1197. character was <SPC> (space).
  1198.  
  1199.    (Currently, `g77' provides no means for treating debug lines as
  1200. normal lines.)
  1201.  
  1202. 
  1203. File: g77.info,  Node: Dollar Signs,  Next: Case Sensitivity,  Prev: Debug Line,  Up: Other Dialects
  1204.  
  1205. Dollar Signs in Symbol Names
  1206. ============================
  1207.  
  1208.    Dollar signs (`$') are allowed in symbol names (after the first
  1209. character) when the `-fdollar-ok' option is specified.
  1210.  
  1211. 
  1212. File: g77.info,  Node: Case Sensitivity,  Next: VXT Fortran,  Prev: Dollar Signs,  Up: Other Dialects
  1213.  
  1214. Case Sensitivity
  1215. ================
  1216.  
  1217.    GNU Fortran offers the programmer way too much flexibility in
  1218. deciding how source files are to be treated vis-a-vis uppercase and
  1219. lowercase characters.  There are 66 useful settings that affect case
  1220. sensitivity, plus 10 settings that are nearly useless, with the
  1221. remaining 116 settings being either redundant or useless.
  1222.  
  1223.    None of these settings have any effect on the contents of comments
  1224. (the text after a `c' or `C' in Column 1, for example) or of character
  1225. or Hollerith constants.  Note that things like the `E' in the statement
  1226. `CALL FOO(3.2E10)' and the `TO' in `ASSIGN 10 TO LAB' are considered
  1227. built-in keywords, and so are affected by these settings.
  1228.  
  1229.    Low-level switches are identified in this section as follows:
  1230.  
  1231.      A Source Case Conversion:
  1232.  
  1233.           0 Preserve (see Note 1)
  1234.  
  1235.           1 Convert to Upper Case
  1236.  
  1237.           2 Convert to Lower Case
  1238.  
  1239.      B Built-in Keyword Matching:
  1240.  
  1241.           0 Match Any Case (per-character basis)
  1242.  
  1243.           1 Match Upper Case Only
  1244.  
  1245.           2 Match Lower Case Only
  1246.  
  1247.           3 Match InitialCaps Only (see tables for spellings)
  1248.  
  1249.      C Built-in Intrinsic Matching:
  1250.  
  1251.           0 Match Any Case (per-character basis)
  1252.  
  1253.           1 Match Upper Case Only
  1254.  
  1255.           2 Match Lower Case Only
  1256.  
  1257.           3 Match InitialCaps Only (see tables for spellings)
  1258.  
  1259.      D User-defined Symbol Possibilities (warnings only):
  1260.  
  1261.           0 Allow Any Case (per-character basis)
  1262.  
  1263.           1 Allow Upper Case Only
  1264.  
  1265.           2 Allow Lower Case Only
  1266.  
  1267.           3 Allow InitialCaps Only (see Note 2)
  1268.  
  1269.    Note 1: `g77' eventually will support `NAMELIST' in a manner that is
  1270. consistent with these source switches--in the sense that input will be
  1271. expected to meet the same requirements as source code in terms of
  1272. matching symbol names and keywords (for the exponent letters).
  1273.  
  1274.    Currently, however, `NAMELIST' is supported by `libg2c', which
  1275. uppercases `NAMELIST' input and symbol names for matching.  This means
  1276. not only that `NAMELIST' output currently shows symbol (and keyword)
  1277. names in uppercase even if lower-case source conversion (option A2) is
  1278. selected, but that `NAMELIST' cannot be adequately supported when
  1279. source case preservation (option A0) is selected.
  1280.  
  1281.    If A0 is selected, a warning message will be output for each
  1282. `NAMELIST' statement to this effect.  The behavior of the program is
  1283. undefined at run time if two or more symbol names appear in a given
  1284. `NAMELIST' such that the names are identical when converted to upper
  1285. case (e.g. `NAMELIST /X/ VAR, Var, var').  For complete and total
  1286. elegance, perhaps there should be a warning when option A2 is selected,
  1287. since the output of NAMELIST is currently in uppercase but will someday
  1288. be lowercase (when a `libg77' is written), but that seems to be
  1289. overkill for a product in beta test.
  1290.  
  1291.    Note 2: Rules for InitialCaps names are:
  1292.  
  1293.    - Must be a single uppercase letter, *or*
  1294.  
  1295.    - Must start with an uppercase letter and contain at least one
  1296.      lowercase letter.
  1297.  
  1298.    So `A', `Ab', `ABc', `AbC', and `Abc' are valid InitialCaps names,
  1299. but `AB', `A2', and `ABC' are not.  Note that most, but not all,
  1300. built-in names meet these requirements--the exceptions are some of the
  1301. two-letter format specifiers, such as `BN' and `BZ'.
  1302.  
  1303.    Here are the names of the corresponding command-line options:
  1304.  
  1305.      A0: -fsource-case-preserve
  1306.      A1: -fsource-case-upper
  1307.      A2: -fsource-case-lower
  1308.      
  1309.      B0: -fmatch-case-any
  1310.      B1: -fmatch-case-upper
  1311.      B2: -fmatch-case-lower
  1312.      B3: -fmatch-case-initcap
  1313.      
  1314.      C0: -fintrin-case-any
  1315.      C1: -fintrin-case-upper
  1316.      C2: -fintrin-case-lower
  1317.      C3: -fintrin-case-initcap
  1318.      
  1319.      D0: -fsymbol-case-any
  1320.      D1: -fsymbol-case-upper
  1321.      D2: -fsymbol-case-lower
  1322.      D3: -fsymbol-case-initcap
  1323.  
  1324.    Useful combinations of the above settings, along with abbreviated
  1325. option names that set some of these combinations all at once:
  1326.  
  1327.       1: A0--  B0---  C0---  D0---    -fcase-preserve
  1328.       2: A0--  B0---  C0---  D-1--
  1329.       3: A0--  B0---  C0---  D--2-
  1330.       4: A0--  B0---  C0---  D---3
  1331.       5: A0--  B0---  C-1--  D0---
  1332.       6: A0--  B0---  C-1--  D-1--
  1333.       7: A0--  B0---  C-1--  D--2-
  1334.       8: A0--  B0---  C-1--  D---3
  1335.       9: A0--  B0---  C--2-  D0---
  1336.      10: A0--  B0---  C--2-  D-1--
  1337.      11: A0--  B0---  C--2-  D--2-
  1338.      12: A0--  B0---  C--2-  D---3
  1339.      13: A0--  B0---  C---3  D0---
  1340.      14: A0--  B0---  C---3  D-1--
  1341.      15: A0--  B0---  C---3  D--2-
  1342.      16: A0--  B0---  C---3  D---3
  1343.      17: A0--  B-1--  C0---  D0---
  1344.      18: A0--  B-1--  C0---  D-1--
  1345.      19: A0--  B-1--  C0---  D--2-
  1346.      20: A0--  B-1--  C0---  D---3
  1347.      21: A0--  B-1--  C-1--  D0---
  1348.      22: A0--  B-1--  C-1--  D-1--    -fcase-strict-upper
  1349.      23: A0--  B-1--  C-1--  D--2-
  1350.      24: A0--  B-1--  C-1--  D---3
  1351.      25: A0--  B-1--  C--2-  D0---
  1352.      26: A0--  B-1--  C--2-  D-1--
  1353.      27: A0--  B-1--  C--2-  D--2-
  1354.      28: A0--  B-1--  C--2-  D---3
  1355.      29: A0--  B-1--  C---3  D0---
  1356.      30: A0--  B-1--  C---3  D-1--
  1357.      31: A0--  B-1--  C---3  D--2-
  1358.      32: A0--  B-1--  C---3  D---3
  1359.      33: A0--  B--2-  C0---  D0---
  1360.      34: A0--  B--2-  C0---  D-1--
  1361.      35: A0--  B--2-  C0---  D--2-
  1362.      36: A0--  B--2-  C0---  D---3
  1363.      37: A0--  B--2-  C-1--  D0---
  1364.      38: A0--  B--2-  C-1--  D-1--
  1365.      39: A0--  B--2-  C-1--  D--2-
  1366.      40: A0--  B--2-  C-1--  D---3
  1367.      41: A0--  B--2-  C--2-  D0---
  1368.      42: A0--  B--2-  C--2-  D-1--
  1369.      43: A0--  B--2-  C--2-  D--2-    -fcase-strict-lower
  1370.      44: A0--  B--2-  C--2-  D---3
  1371.      45: A0--  B--2-  C---3  D0---
  1372.      46: A0--  B--2-  C---3  D-1--
  1373.      47: A0--  B--2-  C---3  D--2-
  1374.      48: A0--  B--2-  C---3  D---3
  1375.      49: A0--  B---3  C0---  D0---
  1376.      50: A0--  B---3  C0---  D-1--
  1377.      51: A0--  B---3  C0---  D--2-
  1378.      52: A0--  B---3  C0---  D---3
  1379.      53: A0--  B---3  C-1--  D0---
  1380.      54: A0--  B---3  C-1--  D-1--
  1381.      55: A0--  B---3  C-1--  D--2-
  1382.      56: A0--  B---3  C-1--  D---3
  1383.      57: A0--  B---3  C--2-  D0---
  1384.      58: A0--  B---3  C--2-  D-1--
  1385.      59: A0--  B---3  C--2-  D--2-
  1386.      60: A0--  B---3  C--2-  D---3
  1387.      61: A0--  B---3  C---3  D0---
  1388.      62: A0--  B---3  C---3  D-1--
  1389.      63: A0--  B---3  C---3  D--2-
  1390.      64: A0--  B---3  C---3  D---3    -fcase-initcap
  1391.      65: A-1-  B01--  C01--  D01--    -fcase-upper
  1392.      66: A--2  B0-2-  C0-2-  D0-2-    -fcase-lower
  1393.  
  1394.    Number 22 is the "strict" ANSI FORTRAN 77 model wherein all input
  1395. (except comments, character constants, and Hollerith strings) must be
  1396. entered in uppercase.  Use `-fcase-strict-upper' to specify this
  1397. combination.
  1398.  
  1399.    Number 43 is like Number 22 except all input must be lowercase.  Use
  1400. `-fcase-strict-lower' to specify this combination.
  1401.  
  1402.    Number 65 is the "classic" ANSI FORTRAN 77 model as implemented on
  1403. many non-UNIX machines whereby all the source is translated to
  1404. uppercase.  Use `-fcase-upper' to specify this combination.
  1405.  
  1406.    Number 66 is the "canonical" UNIX model whereby all the source is
  1407. translated to lowercase.  Use `-fcase-lower' to specify this
  1408. combination.
  1409.  
  1410.    There are a few nearly useless combinations:
  1411.  
  1412.      67: A-1-  B01--  C01--  D--2-
  1413.      68: A-1-  B01--  C01--  D---3
  1414.      69: A-1-  B01--  C--23  D01--
  1415.      70: A-1-  B01--  C--23  D--2-
  1416.      71: A-1-  B01--  C--23  D---3
  1417.      72: A--2  B01--  C0-2-  D-1--
  1418.      73: A--2  B01--  C0-2-  D---3
  1419.      74: A--2  B01--  C-1-3  D0-2-
  1420.      75: A--2  B01--  C-1-3  D-1--
  1421.      76: A--2  B01--  C-1-3  D---3
  1422.  
  1423.    The above allow some programs to be compiled but with restrictions
  1424. that make most useful programs impossible: Numbers 67 and 72 warn about
  1425. *any* user-defined symbol names (such as `SUBROUTINE FOO'); Numbers 68
  1426. and 73 warn about any user-defined symbol names longer than one
  1427. character that don't have at least one non-alphabetic character after
  1428. the first; Numbers 69 and 74 disallow any references to intrinsics; and
  1429. Numbers 70, 71, 75, and 76 are combinations of the restrictions in
  1430. 67+69, 68+69, 72+74, and 73+74, respectively.
  1431.  
  1432.    All redundant combinations are shown in the above tables anyplace
  1433. where more than one setting is shown for a low-level switch.  For
  1434. example, `B0-2-' means either setting 0 or 2 is valid for switch B.
  1435. The "proper" setting in such a case is the one that copies the setting
  1436. of switch A--any other setting might slightly reduce the speed of the
  1437. compiler, though possibly to an unmeasurable extent.
  1438.  
  1439.    All remaining combinations are useless in that they prevent
  1440. successful compilation of non-null source files (source files with
  1441. something other than comments).
  1442.  
  1443. 
  1444. File: g77.info,  Node: VXT Fortran,  Next: Fortran 90,  Prev: Case Sensitivity,  Up: Other Dialects
  1445.  
  1446. VXT Fortran
  1447. ===========
  1448.  
  1449.    `g77' supports certain constructs that have different meanings in
  1450. VXT Fortran than they do in the GNU Fortran language.
  1451.  
  1452.    Generally, this manual uses the invented term VXT Fortran to refer
  1453. VAX FORTRAN (circa v4).  That compiler offered many popular features,
  1454. though not necessarily those that are specific to the VAX processor
  1455. architecture, the VMS operating system, or Digital Equipment
  1456. Corporation's Fortran product line.  (VAX and VMS probably are
  1457. trademarks of Digital Equipment Corporation.)
  1458.  
  1459.    An extension offered by a Digital Fortran product that also is
  1460. offered by several other Fortran products for different kinds of
  1461. systems is probably going to be considered for inclusion in `g77'
  1462. someday, and is considered a VXT Fortran feature.
  1463.  
  1464.    The `-fvxt' option generally specifies that, where the meaning of a
  1465. construct is ambiguous (means one thing in GNU Fortran and another in
  1466. VXT Fortran), the VXT Fortran meaning is to be assumed.
  1467.  
  1468. * Menu:
  1469.  
  1470. * Double Quote Meaning::  `"2000' as octal constant.
  1471. * Exclamation Point::     `!' in column 6.
  1472.  
  1473. 
  1474. File: g77.info,  Node: Double Quote Meaning,  Next: Exclamation Point,  Up: VXT Fortran
  1475.  
  1476. Meaning of Double Quote
  1477. -----------------------
  1478.  
  1479.    `g77' treats double-quote (`"') as beginning an octal constant of
  1480. `INTEGER(KIND=1)' type when the `-fvxt' option is specified.  The form
  1481. of this octal constant is
  1482.  
  1483.      "OCTAL-DIGITS
  1484.  
  1485. where OCTAL-DIGITS is a nonempty string of characters in the set
  1486. `01234567'.
  1487.  
  1488.    For example, the `-fvxt' option permits this:
  1489.  
  1490.      PRINT *, "20
  1491.      END
  1492.  
  1493. The above program would print the value `16'.
  1494.  
  1495.    *Note Integer Type::, for information on the preferred construct for
  1496. integer constants specified using GNU Fortran's octal notation.
  1497.  
  1498.    (In the GNU Fortran language, the double-quote character (`"')
  1499. delimits a character constant just as does apostrophe (`'').  There is
  1500. no way to allow both constructs in the general case, since statements
  1501. like `PRINT *,"2000 !comment?"' would be ambiguous.)
  1502.  
  1503. 
  1504. File: g77.info,  Node: Exclamation Point,  Prev: Double Quote Meaning,  Up: VXT Fortran
  1505.  
  1506. Meaning of Exclamation Point in Column 6
  1507. ----------------------------------------
  1508.  
  1509.    `g77' treats an exclamation point (`!') in column 6 of a fixed-form
  1510. source file as a continuation character rather than as the beginning of
  1511. a comment (as it does in any other column) when the `-fvxt' option is
  1512. specified.
  1513.  
  1514.    The following program, when run, prints a message indicating whether
  1515. it is interpreted according to GNU Fortran (and Fortran 90) rules or
  1516. VXT Fortran rules:
  1517.  
  1518.      C234567  (This line begins in column 1.)
  1519.            I = 0
  1520.           !1
  1521.            IF (I.EQ.0) PRINT *, ' I am a VXT Fortran program'
  1522.            IF (I.EQ.1) PRINT *, ' I am a Fortran 90 program'
  1523.            IF (I.LT.0 .OR. I.GT.1) PRINT *, ' I am a HAL 9000 computer'
  1524.            END
  1525.  
  1526.    (In the GNU Fortran and Fortran 90 languages, exclamation point is a
  1527. valid character and, unlike space (<SPC>) or zero (`0'), marks a line
  1528. as a continuation line when it appears in column 6.)
  1529.  
  1530. 
  1531. File: g77.info,  Node: Fortran 90,  Next: Pedantic Compilation,  Prev: VXT Fortran,  Up: Other Dialects
  1532.  
  1533. Fortran 90
  1534. ==========
  1535.  
  1536.    The GNU Fortran language includes a number of features that are part
  1537. of Fortran 90, even when the `-ff90' option is not specified.  The
  1538. features enabled by `-ff90' are intended to be those that, when `-ff90'
  1539. is not specified, would have another meaning to `g77'--usually meaning
  1540. something invalid in the GNU Fortran language.
  1541.  
  1542.    So, the purpose of `-ff90' is not to specify whether `g77' is to
  1543. gratuitously reject Fortran 90 constructs.  The `-pedantic' option
  1544. specified with `-fno-f90' is intended to do that, although its
  1545. implementation is certainly incomplete at this point.
  1546.  
  1547.    When `-ff90' is specified:
  1548.  
  1549.    * The type of `REAL(EXPR)' and `AIMAG(EXPR)', where EXPR is
  1550.      `COMPLEX' type, is the same type as the real part of EXPR.
  1551.  
  1552.      For example, assuming `Z' is type `COMPLEX(KIND=2)', `REAL(Z)'
  1553.      would return a value of type `REAL(KIND=2)', not of type
  1554.      `REAL(KIND=1)', since `-ff90' is specified.
  1555.  
  1556.